# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-softlayer
pkgver=6.1.0
pkgrel=0
pkgdesc="library for SoftLayer's API"
url="https://github.com/softlayer/softlayer-python"
arch="noarch"
license="MIT"
depends="py3-click py3-prompt_toolkit py3-prettytable3 py3-pygments py3-requests py3-rich py3-urllib3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-mock py3-testtools py3-softlayer-zeep"
source="$pkgname-$pkgver.tar.gz::https://github.com/softlayer/softlayer-python/archive/v$pkgver.tar.gz"
builddir="$srcdir/softlayer-python-$pkgver"

build() {
	python3 setup.py build
}

check() {
	#py3tkinter needed for this test
	python3 -m pytest \
		--deselect=tests/CLI/environment_tests.py::EnvironmentTests::test_getpass_issues1436
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/tests
}

sha512sums="
4b95cd11a0767956b4a63e34cde03ecbbdb5b9c1e35097ff59c32c3ecfb778fb32bf589c3ef7ee6e4ce4767b89b604e8fe0ddf6ef2af9cf0bd72cc12198b1f44  py3-softlayer-6.1.0.tar.gz
"
